package com.servertrack

//import grails.test.mixin.TestFor


/**
 * See the API for {@link grails.test.mixin.services.ServiceUnitTestMixin} for usage instructions
 */
@TestFor(TurService)
@Mock([Tur])
class TurServiceTest {

	
   void testTurgetlist(){
	Tur tur1=new Tur(title:"Turkey", description:"This is a good tur", dateCreated: new Date("1989/1/9")).save(validate: false)
	Tur tur2=new Tur(title:"Egypt", description:"This is a very good tur", dateCreated: new Date("1989/1/9")).save(validate: false)
	
	def model=service.getlist(1)
	println "${model}"
	assert model.size()==2
	assert model[0].title=="Turkey"
	assert model[0].id=="Tur_1"
	assert model[1].title=="Egypt"
	assert model[1].id=="Tur_2"
   	
	} 
}
